package com.ant.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ant.dao.UserDAO;
import com.ant.form.User;
import com.ant.form.UserChatContent;

@Service("userService")
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDAO userDAO;


    @Transactional
    public boolean checkUser(User user) {
        return userDAO.checkUser(user);
    }
    
    @Transactional
    public List<UserChatContent> listOtherUserChatContent(int user_id){
    	return userDAO.listOtherUserChatContent(user_id);
    }
    
    @Transactional
    public boolean addUserChatContent(UserChatContent userChatContent){
    	return userDAO.addUserChatContent(userChatContent);
    }

    @Transactional
	public boolean addUser(User user) {
    	return userDAO.addUser(user);
	}
    
    @Transactional
	public boolean checkDuplicateUser(User user) {
    	return userDAO.checkDuplicateUser(user);
	}
}
